Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some producer ops using the new send operation with batches #825

Closed
wants to merge 5 commits into from

Conversation

zcox
Copy link
Collaborator

@zcox zcox commented Dec 28, 2023

No description provided.

* concurrency and producer batching, and also simplicity of usage. Fails if
* any individual send or ack fails.
*/
def sendBatch[G[_]: Traverse](
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth requiring that G have a NonEmptyTraverse? I think that'd allow the constraint on F below to be a FlatMap.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL NonEmptyTraverse, had no idea. That does indeed work for sendBatch, the problem is down below there is no NonEmptyTraverse[Chunk] in fs2. Maybe we could impl one, not sure what that takes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or we ditch the chunk-related stuff. It seemed cool, but no idea if it's useful in practice.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chunk does have a toNel: Option[NonEmptyList[O]] that could be useful?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

590ffc2 shows one option: a parallel series of NonEmpty operations.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or 3253892 shows one way to use Chunk with NonEmptyTraverse.

@milessabin
Copy link
Contributor

Does this want picking up and finishing off?

@milessabin milessabin self-assigned this Aug 1, 2024
@milessabin
Copy link
Contributor

Turns out I can't add to this branch (presumably because it's Zach's) so I've continued here: #906

@milessabin milessabin closed this Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants